import { rehypeCodeBlocks, rehypeLayouts, rehypeListRoles, rehypeMdxExtractExamples, rehypeMdxInjectEndpoint, rehypeRawComponents, rehypeZoomImages, remarkFrames, remarkMdxInjectSnippets, remarkMdxRemoveJs, remarkRemoveImports, remarkTableOfContents, } from './plugins/index.js';
import rehypeMdxRemoveUnknownJsx from './plugins/rehype/rehypeMdxRemoveUnknownJsx/index.js';
export const getMDXOptions = ({ data }) => {
    return {
        remarkPlugins: [
            [remarkMdxInjectSnippets, data === null || data === void 0 ? void 0 : data.snippetTreeMap],
            remarkMdxRemoveJs,
            remarkFrames,
            remarkTableOfContents,
            remarkRemoveImports,
        ],
        rehypePlugins: [
            [
                rehypeMdxRemoveUnknownJsx,
                {
                    allowedComponents: data === null || data === void 0 ? void 0 : data.allowedComponents,
                },
            ],
            rehypeCodeBlocks,
            rehypeListRoles,
            rehypeMdxExtractExamples,
            [rehypeMdxInjectEndpoint, data === null || data === void 0 ? void 0 : data.pageMetadata, data === null || data === void 0 ? void 0 : data.mintConfig],
            rehypeRawComponents,
            rehypeLayouts,
            rehypeZoomImages,
        ],
        format: 'mdx',
        useDynamicImport: true,
    };
};
